package com.springboot.sofa.controller;

import com.alipay.sofa.runtime.api.annotation.SofaReference;
import com.alipay.sofa.runtime.api.annotation.SofaReferenceBinding;
import com.springboot.sofa.service.UserService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: TongRui乀
 * @Date: 2021/7/4 16:01
 * @description：
 */
@RestController
@RequestMapping("user")
public class UserController {

    @SofaReference(interfaceType = UserService.class, jvmFirst = false, binding = @SofaReferenceBinding(bindingType = "bolt"))
    private UserService userService;

    @GetMapping
    public String hello(){
        return userService.hello();
    }

}
